package com.owbtgad.common.utils;

import android.app.Dialog;
import android.content.Context;
import android.view.View;

import com.google.android.material.bottomsheet.BottomSheetDialog;
import com.owbtgad.common.R;

import org.jetbrains.annotations.NotNull;

public class MyDialog {

    @NotNull
    public static Dialog getButtonDialog(Context context, View view) {
        BottomSheetDialog dialog = new BottomSheetDialog(context);
        dialog.setContentView(view);
        dialog.getWindow().findViewById(R.id.design_bottom_sheet)
                .setBackgroundResource(android.R.color.transparent);
        dialog.setCancelable(false);//下拉hide
        dialog.setCanceledOnTouchOutside(true);
        dialog.show();
        return dialog;
    }



}
